/**
 * Created by wust on 2019-10-31 09:29:45
 * Copyright © 2019 wust. All rights reserved.
 */
package com.wust.smartcity.admin.server.core.api.feign.server;


import com.wust.smartcity.admin.server.core.dao.SysUserMapper;
import com.wust.smartcity.common.annotations.FeignApi;
import com.wust.smartcity.common.dto.WebResponseDto;
import com.wust.smartcity.common.entity.sys.user.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: wust
 * @date: Created in 2019-10-31 09:29:45
 * @description: 用户表对应feign接口
 *
 */
@FeignApi
@RequestMapping("/api/feign/v1/UserFeignApi")
@RestController
public class UserFeignApi {
    @Autowired
    private SysUserMapper sysUserMapper;


    @RequestMapping(value = "/selectOne",method= RequestMethod.POST)
    public WebResponseDto selectOne(@RequestBody SysUser search) {
        WebResponseDto responseDto = new WebResponseDto();
        SysUser user = sysUserMapper.selectOne(search);
        responseDto.setObj(user);
        return  responseDto;
    }
}
